	<div class="navButtonsTop rounded-corners">
		<h1 class="title"><g:message code="title.note.list"/></h1>
	</div>
	
	<div class="element">
		<g:if test="${noteInstanceList}">	
			
			<g:if test="${session.noteViewMode == 'flow'}">
		    	<g:each in="${noteInstanceList}" var="noteInstance">
		    		<div class="note rounded-corners">
       					<g:render template="show" model="['noteInstance': noteInstance]"/>
       				</div>
		   		</g:each>
			</g:if>
			
			<g:if test="${session.noteViewMode == 'list'}">
				<div class="tableList">
					<table>
			       		<thead>
			    			<tr>
			    				<usr:isAdmin>
				          	    	<g:sortableColumn property="id" titleKey="default.label.id" class="id"/>
				          	    	<g:sortableColumn property="disabled" titleKey="default.label.disabled"/>
				          	    </usr:isAdmin>
				          	    <g:sortableColumn property="title" titleKey="default.label.title" />
				          	    <th class="createdBy"><g:message code="default.label.createdBy"/></th>
			               	</tr>
						</thead>
						<tbody>
		                   <g:each in="${noteInstanceList}" status="i" var="noteInstance">
		                       <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
									<usr:isAdmin>
		                           		<td class="id">${fieldValue(bean: noteInstance, field: "id")}</td>
		                           		<td class="disabled"><g:formatBoolean boolean="${noteInstance.disabled}" /></td>
		                           	</usr:isAdmin>
									<td>${fieldValue(bean: noteInstance, field: "title")}</td>
									<td class="createdBy">${fieldValue(bean: noteInstance, field: "createdBy.alias")}</td>
		                       </tr>
		                   </g:each>
						</tbody>
					</table>
				</div>
			</g:if>
	</g:if>
	
	<g:else>
		<div class="rounded-corners noData">
			<g:message code="default.no.notes"/>
		</div>
	</g:else>
</div>

<div class="paginateButtons rounded-corners">
	<div class="left">
		<g:paginate total="${noteInstanceTotal}" />
	</div>
</div>